<?php
/**
 * CreateTime: 2023/6/12 16:31
 */

namespace App\Models\Staff;

use App\Consts\TableConsts\TableConsts;
use App\Models\BaseModelV2;

class StaffRoleModel extends BaseModelV2
{
    protected $table = TableConsts::CY_STAFF_ROLE_TABLE_NAME;

    protected $primaryKey = 'id';

    protected $fillable = [
        'id',
        'adate',
        'staff_id',
        'role_id',
    ];

    public function getStaffIdsByRoleId($role_id){
        return $this
            ->select(['staff_id'])
            ->where('role_id',$role_id)->get();
    }
}